<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>
        <%= __('titLe') %>
    </title>
    <link href="image/favicon.ico" rel="shortcut icon">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_607959_8t0w2txptnj.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/header.css">
    <link rel="stylesheet" href="css/home.css">
    <link rel="stylesheet" href="/css/userInfo.css">
    <link rel="stylesheet" href="css/loading.css">
</head>

<body>
    <div id="app" class="app">
        <%- include('base/header',{lang:lang}); %>
            <section class="container">
                <div class="loading" v-show="!loading">
                    <div class="preloader_4">
                        <span></span>
                        <span></span>
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                </div>
                <!-- 轮播 -->
                <div class="width1260 swiperbox">
                    <div class="swiper-container">
                        <!-- 轮播 -->
                        <div class="swiper-wrapper">
                            <div class="swiper-slide">
                                <a href="/Details/63">
                                    <img src="image/slider01.jpg" class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                            <div class="swiper-slide">
                                <a href="/Details/60">
                                    <img src="image/slider05.jpg" class="img-responsive" alt="轮播1">
                                </a>
                            </div>
                            <% if(!allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/singin">
                                        <img src="image/slider07.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/PicksPal">
                                        <img src="image/slider07.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(!allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/singin">
                                        <img src="image/slider06.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/growth">
                                        <img src="image/slider06.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(!allMine.length){ %>
                                <div class="swiper-slide">
                                    <a href="/singin">
                                        <img src="image/slider04.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(allMine.length){ %>
                                <div class="swiper-slide">
                                    <a @click="gotohyperdice">
                                        <img src="image/slider04.jpg" class="img-responsive" alt="轮播1">
                                    </a>
                                </div>
                            <% } %>
                            <% if(gamelist.length){ %>
                                <% gamelist.forEach((item,index) => { %>
                                    <% if(allMine.length){ %>
                                        <div class="swiper-slide">
                                            <a @click="gotohyperdice">
                                                <img src="<%= item.imageUrl[0] %>" class="img-responsive" alt="轮播1">
                                            </a>
                                        </div>
                                    <% } %>
                                    <% if(!allMine.length){ %>
                                        <div class="swiper-slide">
                                            <a href="/singin">
                                                <img src="<%= item.imageUrl[0] %>" class="img-responsive" alt="轮播1">
                                            </a>
                                        </div>
                                    <% } %>
                                <% })%>
                            <% } %>
                        </div>
                        <!-- 分页器 -->
                        <div class="swiper-pagination swiperpagination"></div>
                        <!-- 左右箭头 -->
                        <div class="swiper-button-next swipernext"></div>
                        <div class="swiper-button-prev swiperprev"></div>
                    </div>
                    <!-- 公告 -->
                    <% if(allannouncement&&allannouncement.length){ %>
                        <div class="newbulletin">
                            <ul>
                                <% allannouncement.forEach((item,index) => { %>
                                    <% if(index==0){ %>
                                        <li class="bulletin-item firstbulletin">
                                            <span class="bulletin-round"></span>
                                            <a href="/Details/<%= item.id %>" class="bulletin-name">
                                                <%= item.title %>
                                            </a>
                                        </li>
                                        <% }else{ %>
                                            <li class="bulletin-item">
                                                <span class="bulletin-round"></span>
                                                <a href="/Details/<%= item.id %>" class="bulletin-name">
                                                    <%= item.title %>
                                                </a>
                                                <span class="bulletin-date" v-html="filtertime(<%= item.publishTime %>)"></span>
                                            </li>
                                            <% } %>
                                                <% }) %>
                            </ul>
                        </div>
                        <% } %>
                </div>
                <!-- 热门游戏 -->
                <div class="width1260 aggamenav">
                    <!-- 楼层名称 -->
                    <div class="gamefloorname">
                        <% if(lang=='zh_TW'){ %>
                            <img src="/image/hotgamezh_TW.png" class="img-responsive" />
                            <% } %>
                                <% if(lang=='zh_CN'){ %>
                                    <img src="/image/hotgamezh_CN.png" class="img-responsive" />
                                    <% } %>
                                        <% if(lang=='en_US'){ %>
                                            <img src="/image/hotgameen_US.png" class="img-responsive" />
                                            <% } %>
                    </div>
                    <!-- 楼层内容 -->
                    <div class="hotgamelist">
                        <% if(gamelist.length){ %>
                            <% gamelist.forEach((item,index) => { %>
                                <% if(allMine.length){ %>
                                    <div class="hotlist-item">
                                        <a @click="gotohyperdice">
                                            <img src="/image/hotgame01.jpg" alt="">
                                        </a>
                                    </div>
                                    <% } %>
                                        <% if(!allMine.length){ %>
                                            <div class="hotlist-item">
                                                <a href="/singin">
                                                    <img src="/image/hotgame01.jpg" alt="">
                                                </a>
                                            </div>
                                            <% } %>
                                                <% }) %>
                                                    <% } %>
                                                        <div class="hotlist-item">
                                                            <% if(!allMine.length){ %>
                                                                <!-- <a href="/singin"> -->
                                                                <a href="/LotteryTicket">
                                                                    <img src="/image/hotgame02.jpg" alt="">
                                                                </a>
                                                                <% } %>
                                                                    <% if(allMine.length){ %>
                                                                        <!-- <a href="javascript:void(0);"> -->
                                                                        <a href="/LotteryTicket">
                                                                            <img src="/image/hotgame02.jpg" alt="">
                                                                        </a>
                                                                        <% } %>
                                                        </div>
                    </div>
                </div>
                <!-- AG亚游导航 -->
                <div class="width1260 aggamenav">
                    <!-- 楼层名称 -->
                    <div class="gamefloorname">
                        <% if(lang=='zh_TW'){ %>
                            <img src="/image/aggamezh_TW.png" class="img-responsive" />
                            <% } %>
                                <% if(lang=='zh_CN'){ %>
                                    <img src="/image/aggamezh_CN.png" class="img-responsive" />
                                    <% } %>
                                        <% if(lang=='en_US'){ %>
                                            <img src="/image/aggameen_US.png" class="img-responsive" />
                                            <% } %>
                    </div>
                    <!-- AG导航条 -->
                    <div class="aggametransform">
                        <!-- AG导航 -->
                        <div class="aggametit">
                            <!-- 导航图片 -->
                            <!-- <div class="aggametit-icon"></div> -->
                            <!-- 币种切换 -->
                            <div class="aggamechoosecoin">
                                <div class="aggamechoosecoin-input">
                                    <div class="aggamechoosecoin-select" @click="exchange.isshowcoinarr=!exchange.isshowcoinarr">
                                        <img :src="'image/'+exchange.defaultcoin+'.png'" :alt="exchange.defaultcoin">
                                        <span v-html="exchange.defaultcoin"></span>
                                        <i class="icon iconfont icon-sanjiaodown"></i>
                                    </div>
                                    <!-- 下拉菜单 -->
                                    <% if(allMine.length){ %>
                                        <div class="dropdownmenu" v-show="exchange.isshowcoinarr">
                                            <% allMine.forEach( (item,index) => { %>
                                                <div>
                                                    <div class="dropdownmenu-item coinitem" 
                                                        :class="{selected:'<%- item.coin %>'==exchange.defaultcoin}" 
                                                        @click="changeexchangecoin('<%= item.coin %>','<%= item.balance %>')">
                                                        <img src="image/<%= item.coin %>.png" alt="">
                                                        <span><%= item.coin %></span>
                                                    </div>
                                                 </div>
                                            <% }) %>
                                        </div>
                                        <% } %>
                                </div>
                            </div>
                            <!-- 各币种AG分 -->
                            <div class="myintegral">
                                <div class="integral">
                                    <%= __('MyAGpoints') %>&nbsp;</div>
                                <div class="integral-num" v-html="userinfo.myagbanlance"></div>
                            </div>
                        </div>
                        <!-- 兑换积分 -->
                        <div class="transformintegral">
                            <div class="transformhelpbox">
                                <div class="transformhelp">?</div>
                                <div class="transformhelp1 topcenter <%= lang %>">
                                    <%= __('AGdivision') %>
                                </div>
                            </div>
                            <% if(allMine.length){ %>
                                <div class="transformbtn transformin" :class="{active:showtransforminag==true}" @click="changetransform('showtransforminag')">
                                    <%= __('ExchangeAGpoints') %>
                                </div>
                                <div class="transformbtn" :class="{active:showtransformout==true}" @click="changetransform('showtransformout')">
                                    <%= __('WithdrawAGpoints') %>
                                </div>
                                <% } %>
                                    <% if(!allMine.length){ %>
                                        <div class="transformbtn transformin">
                                            <a href="/singin">
                                                <%= __('ExchangeAGpoints') %>
                                            </a>
                                        </div>
                                        <div class="transformbtn">
                                            <a href="/singin">
                                                <%= __('WithdrawAGpoints') %>
                                            </a>
                                        </div>
                                        <% } %>
                        </div>
                    </div>
                    <!-- 兑换AG分 -->
                    <div class="transforminbox transformbox" v-show="showtransforminag">
                        <div class="transform-form">
                            <div class="form-item">
                                <label class="item-label">
                                    <%= __('Currencyexchange') %>
                                </label>
                                <div class="item-label">
                                    <span v-html="exchange.defaultcoin"></span>
                                </div>
                            </div>
                            <!-- 兑换比例 -->
                            <div class="form-item form-bigmg">
                                <label class="item-label">
                                    <%= __('Exchangequantity') %>
                                </label>
                                <div class="item-input">
                                    <input type="text" class="form-input" v-model="exchangenum" :disabled="exchange.disexchangenum">
                                </div>
                            </div>
                            <div class="form-item">
                                <label class="item-label">
                                    <%= __('Youwillget') %>
                                </label>
                                <div class="item-tip">
                                    <span v-html="exchange.exchangeagcoin"></span>
                                </div>
                                <label class="item-label">
                                    <%= __('AGPoints') %>
                                </label>
                            </div>
                        </div>
                        <button class="postform" @click="confirmexchange" :disabled="exchange.disabledbtn">
                            <%= __('Confirmexchange') %>
                        </button>
                    </div>
                    <!-- 兑出AG分 -->
                    <div class="transformoutbox transformbox" v-show="showtransformout">
                        <div class="transform-form">
                            <!-- 兑换比例 -->
                            <div class="form-item">
                                <label class="item-label">
                                    <%= __('CashOutpoints') %>
                                </label>
                                <div class="item-input">
                                    <input type="text" class="form-input" v-model="cashoutnum">
                                </div>
                            </div>
                            <!-- 换算币种值 -->
                            <div class="form-item form-bigmg">
                                <label class="item-label">
                                    <%= __('Youwillget') %>
                                </label>
                                <div class="item-tip">
                                    <span v-html="cashout.exchangeagcoin"></span>
                                </div>
                                <label class="item-label" v-html="exchange.defaultcoin"></label>
                            </div>
                        </div>
                        <button class="postform" @click="confircashout" :disabled="cashout.disabledbtn">
                            <%= __('Confirmation') %>
                        </button>
                    </div>
                </div>
                <!-- AG亚游列表 -->
                <div class="width1260 aggamelist">
                    <% if(gamerecommend.length){ %>
                        <% gamerecommend.forEach((item,index) => { %>
                            <% if(allMine.length){ %>
                                <div class="list-item">
                                    <img src="<%= item.imageUrl[0] %><%= lang %>.jpg" alt="AG亚游" class="img-responsive" @click="enteraggame('<%- item.code %>')">
                                    <div class="list-name">
                                        <span class="game-name" @click="enteraggame('<%- item.code %>')">
                                            <%= JSON.parse(item.name)[lang] %>
                                        </span>
                                        <div class="gotogame" @click="enteraggame('<%- item.code %>')">
                                            <i class="icon iconfont icon-iconfontjiantou4"></i>
                                        </div>
                                    </div>
                                </div>
                                <% } %>
                                    <% if(!allMine.length){ %>
                                        <div class="list-item">
                                            <a href="/singin">
                                                <img src="<%= item.imageUrl[0] %><%= lang %>.jpg" alt="AG亚游" class="img-responsive">
                                                <div class="list-name">
                                                    <span class="game-name">
                                                        <%= JSON.parse(item.name)[lang] %>
                                                    </span>
                                                    <div class="gotogame">
                                                        <i class="icon iconfont icon-iconfontjiantou4"></i>
                                                    </div>
                                                </div>
                                            </a>
                                        </div>
                                        <% } %>
                                            <% }) %>
                                                <% } %>
                                                    <img src="image/top.png" alt="" class="returnTOp" @click="REturnTOp">
                </div>
                <!-- 更多AG游戏 -->
                <div class="width1260 moreaggame">
                    <% if(allMine.length){ %>
                        <a href="/moregame">
                            <%= __('MoreAGgames') %>
                        </a>
                        <% } %>
                            <% if(!allMine.length){ %>
                                <a href="/singin">
                                    <%= __('MoreAGgames') %>
                                </a>
                                <% } %>
                </div>
                <section>
        <%- include('base/footer'); %>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.0.2/js/swiper.min.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="js/home.js"></script>
</body>

</html>